package com.lagou.pojo;

import com.lagou.enums.SqlCommandType;

/**
 * mapper.xml 映射文件中的 select｜insert｜update｜delete 标签信息封装对象
 */
public class MappedStatement {

    /**
     * 唯一标识
     */
    private String id;

    /**
     * SQL 命令类型
     */
    private SqlCommandType sqlCommandType;

    /**
     * 参数类型
     */
    private Class<?> parameterType;

    /**
     * 返回值类型
     */
    private Class<?> resultType;

    /**
     * sql语句
     */
    private String sql;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public SqlCommandType getSqlCommandType() {
        return sqlCommandType;
    }

    public void setSqlCommandType(SqlCommandType sqlCommandType) {
        this.sqlCommandType = sqlCommandType;
    }

    public Class<?> getParameterType() {
        return parameterType;
    }

    public void setParameterType(Class<?> parameterType) {
        this.parameterType = parameterType;
    }

    public Class<?> getResultType() {
        return resultType;
    }

    public void setResultType(Class<?> resultType) {
        this.resultType = resultType;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    @Override
    public String toString() {
        return "MappedStatement{" +
                "id='" + id + '\'' +
                ", sqlCommandType=" + sqlCommandType +
                ", parameterType='" + parameterType + '\'' +
                ", resultType='" + resultType + '\'' +
                ", sql='" + sql + '\'' +
                '}';
    }

}
